package com.example.day01_weather.api;


import com.example.day01_weather.bean.CityBean;
import com.example.day01_weather.bean.LatitudeBean;
import com.example.day01_weather.bean.Station_CityBean;
import com.example.day01_weather.bean.Station_CodeBean;
import com.example.day01_weather.bean.Station_iaqiBean;
import com.example.day01_weather.bean.Station_listBean;
import com.example.day01_weather.bean.WeatherBean;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 *
 */
public interface ApiService {

    String BASE_URL="https://jisutqybmf.market.alicloudapi.com/weather/";
    String BASE_W_UEL="https://api.epmap.org/api/v1/air/";
//
//    @Headers("A:")
//    @GET("weather/query")
//    Call<WeatherBean> getData(@Query("city") String city);
//
//    @Headers("Authorization:APPCODE 964e16aa1ae944e9828e87b8b9fbd30a")
//    @GET("weather/city")
//    Call<CityBean> getCity();
//station_code
//    String BASE_URL = "https://jisutqybmf.market.alicloudapi.com/weather/";

    @GET("city")
    Call<CityBean> getCity();

    @GET("query")
    Call<WeatherBean> queryWeathcer(@QueryMap Map<String,String> map);

    @GET("v1/air")
    Call<LatitudeBean> getLatitude(@Query("latitude") double latitude, @Query("longitude")double longitude);

    @GET("station_list")
    Observable<Station_listBean> getStation_List();

    @GET("station_iaqi")
    Observable<Station_iaqiBean> getStation_Iaqi(@Query("station_code") String station_code);

    @GET("city")
    Observable<Station_CityBean> getStation_City(@Query("city") String station);

    @GET("station")
    Observable<Station_CodeBean> GetStation_code(@Query("station_code") String station_code);

}
